package com.marvels.financial.loan.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.github.pagehelper.Page;
import com.marvels.financial.loan.dto.LendPaymentConditionDTO;
import com.marvels.financial.loan.dto.McfeRepaymentFlowDTO;
import com.marvels.financial.loan.dto.RepaymentFlowListDTO;

public interface McfeRepaymentFlowDao {

    int insertSelective(McfeRepaymentFlowDTO record);
    /**查询还款流水(状态status为A1)
	 * @author 娄凯琦
	 * @date 2018年5月17日  
	 * @param loanAfterInfo
	 * @return
	 */
	public McfeRepaymentFlowDTO selectRepaymentFlowDTO(McfeRepaymentFlowDTO mcfeRepaymentFlowDTO);
	
	/**根据主键id更改还款流水的状态
	 * @author 娄凯琦
	 * @date 2018年5月24日  
	 * @param id
	 * @param status
	 */
	public void updateStatusById(@Param("id")Integer id,@Param("status")String status);
	
	
	
	/**
	 * 查询还款明细
	 * @param conditionDTO
	 * @return
	 */
	public Page<RepaymentFlowListDTO>  paymentFlowList(LendPaymentConditionDTO conditionDTO);
	
	
	/**
	 * 新版查询还款明细
	 * @param conditionDTO
	 * @return
	 */
	public Page<RepaymentFlowListDTO>  newPaymentFlowList(LendPaymentConditionDTO conditionDTO);
	
	/**
	 * 新版查询还款明细统计金额
	 * @param conditionDTO
	 * @return
	 */
	public RepaymentFlowListDTO  newPaymentFlowAmountStatic(LendPaymentConditionDTO conditionDTO);
	
	/**
	 * 新版查询还款详情
	 * @param conditionDTO
	 * @return
	 */
	public Page<RepaymentFlowListDTO>  newPaymentFlowDetail(LendPaymentConditionDTO conditionDTO);
	
	/**
	 * 查询代扣详情
	 * @param conditionDTO
	 * @return
	 */
	public Page<McfeRepaymentFlowDTO> selectRepaymentFlowList(LendPaymentConditionDTO conditionDTO);
	
	
	/**
	 * 根据loanId查询处在冲账中的流水
	 * @return
	 */
	public McfeRepaymentFlowDTO selectDealingByLoanId(@Param("loanId") String loanId);
	
	
	/**
	 * 更新未冲账状态 批次号
	 * @param batName
	 * @return
	 */
	public int updateBatName(@Param(value="batName") String batName);
	
	
	
	/**
	 * 通过批次号查询还款流水/冲销流水
	 * @param batName
	 * @return
	 */
	public List<McfeRepaymentFlowDTO> selectBybatName(@Param(value="batName") String batName);

}